﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameServer.Servers
{
    /// <summary>
    /// 房间状态
    /// </summary>
    enum RoomState
    {
        WaitingJoin,        //等待加入
        WaitingBattle,      //等待进入战斗场景
        Battle,             //战斗中
        End                 //战斗结束
    }
    class Room
    {
        private List<Client> clientRoom = new List<Client>();
        private RoomState state = RoomState.WaitingJoin;

        /// <summary>
        /// 房间状态
        /// </summary>
        /// <returns></returns>
        public bool IsWaitingJoin()
        {
            return state == RoomState.WaitingJoin;
        }

        public void AddClient(Client client)
        {
            clientRoom.Add(client);
        }

        /// <summary>
        /// 房主信息
        /// </summary>
        /// <returns></returns>
        public string GetHouseOwnerData()
        {
            return clientRoom[0].GetUserData();
        }
    }
}
